<?php if (!defined('THINK_PATH')) exit(); /*a:3:{s:50:"D:\webroot\tongji/app/home\view\mcenter/index.html";i:1539849597;s:48:"D:\webroot\tongji/app/home\view\common/head.html";i:1539420927;s:50:"D:\webroot\tongji/app/home\view\common/footer.html";i:1542422876;}*/ ?>
<!DOCTYPE html>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href='__HOME__/css/aui.css' rel='stylesheet' />
<style>
  .aui-bar-nav{background:white;}
  .aui-bar-nav .aui-btn .aui-iconfont{color:black;}
  body{background:#ffffff;}
  .aui-bar-nav .aui-title{color:black;}
  h1{font-weight:600;font-size:2rem;color:#17204d}
  
  .avatar img{border-radius:10px;width:80%;margin:auto;}
  .nickname{font-size:0.8rem;line-height:2rem;}
  
  .aui-list .aui-list-item{background-image:none;}
  .aui-list{background-image:none;}
  hr{border-bottom:1px solid #efefef;margin:15px 0}
</style>
<title>用户中心</title>
<body>
   <header class="aui-bar aui-bar-nav">
    <a class="aui-pull-left aui-btn aui-btn-outlined" href='javascript:history.go(-1);'>
        <span class="aui-iconfont aui-icon-left"></span>
    </a>
    <div class="aui-title"></div>
    <a class="aui-pull-right aui-btn aui-btn-outlined"  href='index.html'>
        <span class="aui-iconfont aui-icon-home"></span>
    </a>
  </header>
<div class='aui-content aui-content-padded'>
  <h1>Ｍy family</h1>
  <div class='aui-row-padded'>
      <div class='aui-col-xs-4 avatar'>
	     <img src='__HOME__/images/default.jpg' />
	  </div>
      <div class='aui-col-xs-8 sign'>
	     <p class='nickname'><b>Nickname:<span id='nickname'><?php echo $user['nickname']; ?></span></b> <i class="aui-iconfont aui-icon-edit" onclick='edit("nickname")'></i></p>
	     <p>Message:<span id='sign_msg'><?php echo $user['sign_msg']; ?></span> <i class="aui-iconfont aui-icon-edit" onclick='edit("sign_msg")'></i></p>
	  </div>
  </div>
 <div style='clear:both'></div>
  <div class="aui-card-list">
            
            <div class="aui-card-list-content">
                <ul class="aui-list aui-media-list">
                    <li class="aui-list-item aui-list-item-middle">
                        <div class="aui-media-list-item-inner">
                            <div class="aui-list-item-media" style="width: 2rem;">
                                <img src="__HOME__/images/m1.jpg" class="aui-img-round">
                            </div>
                            <div class="aui-list-item-inner aui-list-item-arrow">
                                 <a href='<?php echo url("level"); ?>'><div class="aui-list-item-text">
                                    <div class="aui-list-item-title aui-font-size-14">会员等级</div>
                                    <div class="aui-list-item-right">F<?php echo $user['level']; ?></div>
                                </div></a>
                            </div>
                        </div>
                    </li>
					
					<li class="aui-list-item aui-list-item-middle">
                        <div class="aui-media-list-item-inner">
                            <div class="aui-list-item-media" style="width: 2rem;">
                                <img src="__HOME__/images/m2.jpg" class="aui-img-round">
                            </div>
                            <div class="aui-list-item-inner aui-list-item-arrow">
                               <a href='<?php echo url("knowledges"); ?>'> <div class="aui-list-item-text">
                                    <div class="aui-list-item-title aui-font-size-14">知识成长值</div>
                                    <div class="aui-list-item-right">0分</div>
                                </div></a>
                            </div>
                        </div>
                    </li>
					
					<li class="aui-list-item aui-list-item-middle">
                        <div class="aui-media-list-item-inner">
                            <div class="aui-list-item-media" style="width: 2rem;">
                                <img src="__HOME__/images/m3.jpg" class="aui-img-round">
                            </div>
                            <div class="aui-list-item-inner aui-list-item-arrow">
                                <a href='<?php echo url("task"); ?>'><div class="aui-list-item-text">
                                    <div class="aui-list-item-title aui-font-size-14">我的任务</div>
                                    <div class="aui-list-item-right"></div>
                                </div></a>
                            </div>
                        </div>
                    </li>
					<hr/>
					
					<li class="aui-list-item aui-list-item-middle">
                        <div class="aui-media-list-item-inner">
                            <div class="aui-list-item-media" style="width: 2rem;">
                                <img src="__HOME__/images/m4.jpg" class="aui-img-round">
                            </div>
                            <div class="aui-list-item-inner aui-list-item-arrow">
                                <a href='<?php echo url("stockbuy"); ?>'><div class="aui-list-item-text">
                                    <div class="aui-list-item-title aui-font-size-14">股权认购</div>
                                    <div class="aui-list-item-right"></div>
                                </div>
							    </a>
                            </div>
                        </div>
                    </li>
					
					<li class="aui-list-item aui-list-item-middle">
                        <div class="aui-media-list-item-inner">
                            <div class="aui-list-item-media" style="width: 2rem;">
                                <img src="__HOME__/images/m5.jpg" class="aui-img-round">
                            </div>
                            <div class="aui-list-item-inner aui-list-item-arrow">
                                <a href='<?php echo url("mychange"); ?>'><div class="aui-list-item-text">
                                    <div class="aui-list-item-title aui-font-size-14">零钱包</div>
                                    <div class="aui-list-item-right"><?php echo $user['coin']; ?> FOS</div>
                                </div></a>
                            </div>
                        </div>
                    </li>
					
					<li class="aui-list-item aui-list-item-middle">
                        <div class="aui-media-list-item-inner">
                            <div class="aui-list-item-media" style="width: 2rem;">
                                <img src="__HOME__/images/m6.jpg" class="aui-img-round">
                            </div>
                            <div class="aui-list-item-inner aui-list-item-arrow">
                               <a href='<?php echo url("challenge"); ?>'> <div class="aui-list-item-text">
                                    <div class="aui-list-item-title aui-font-size-14">我的挑战</div>
                                    <div class="aui-list-item-right"></div>
                                </div></a>
                            </div>
                        </div>
                    </li>
                    <hr/>
					
					<li class="aui-list-item aui-list-item-middle">
                        <div class="aui-media-list-item-inner">
                            <div class="aui-list-item-media" style="width: 2rem;">
                                <img src="__HOME__/images/m7.jpg" class="aui-img-round">
                            </div>
                            <div class="aui-list-item-inner aui-list-item-arrow">
                               <a href='<?php echo url("signin"); ?>'> <div class="aui-list-item-text">
                                    <div class="aui-list-item-title aui-font-size-14">每日签到</div>
                                    <div class="aui-list-item-right">已连续签到0天</div>
                                </div></a>
                            </div>
                        </div>
                    </li>
					
					<li class="aui-list-item aui-list-item-middle">
                        <div class="aui-media-list-item-inner">
                            <div class="aui-list-item-media" style="width: 2rem;">
                                <img src="__HOME__/images/m8.jpg" class="aui-img-round">
                            </div>
                            <div class="aui-list-item-inner aui-list-item-arrow">
                                <div class="aui-list-item-text">
                                    <div class="aui-list-item-title aui-font-size-14">设置</div>
                                    <div class="aui-list-item-right"></div>
                                </div>
                            </div>
                        </div>
                    </li>
                </ul>
            </div>
        </div>
    <div class='aui-row' align=center style='font-size:0.5rem;color:gray;'>FOS 版本号1.0</div>
    <div class='aui-row' align=center>
	    <p><div class="aui-btn" id='logout' onclick="logout()" style='background:black;color:white;width:80%;'>退出</div></p>
	</div>
</div>

<script type="text/javascript" src="__HOME__/script/api.js"></script>
<script type="text/javascript" src="__HOME__/script/aui-tab.js"></script>
<script type="text/javascript" src="__HOME__/script/aui-dialog.js" ></script>
<script type="text/javascript" src="__HOME__/script/aui-toast.js" ></script>
<script type="text/javascript" src="__HOME__/js/jquery.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/static/layer/layer.js"></script>

<script type="text/javascript">
    var dialog = new auiDialog({});
    var tab = new auiTab({
        element:document.getElementById("tab"),
        index:1,
        repeatClick:false
    },function(ret){
        console.log(ret);
    });
	
	function logout(){
	    dialog.alert({
			title:"提示",
			msg:'确定退出?',
			buttons:['取消','确定']
		},function(ret){
			if(ret){
				if(ret.buttonIndex == 1){
				
				}else{
				    $.post('<?php echo url("login/logout"); ?>', function(data){
						location.href = '<?php echo url("login/index"); ?>';
					})
				}
			}
		})
	}
	
	function edit(col){
	    if(col == 'nickname'){
		    title = '请输入呢称';
		}else{
		    title = '请输入签名';
		}
	    dialog.prompt({
			title:title,
			buttons:['取消','确定']
		},function(ret){
			if(ret.buttonIndex == 2){
				var text = ret.text;
				$.post("<?php echo url('mcenter/edit_col'); ?>", {col:col, val:text}, function(data){
				    if(data == 0){
					    $("#"+col).text(text);
					}else{
					    dialog.alert({
							title:"提示",
							msg:"系统繁忙，请稍后重试"
						})
					}
				})
			}
		})
	}
</script>
</body>
</html>